package com.hongdee.help.coupon.service.impl;

import com.hongdee.help.coupon.dao.ITCouponDao;
import com.hongdee.help.coupon.service.ITCouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 优惠券相关帮助接口
 */
@Service
public class TCouponServiceImpl implements ITCouponService {

    @Autowired
    private ITCouponDao couponDao;

    /**
     * 更新指定车辆优惠券打印状态信息
     * @param plateNum
     * @param companyId
     * @param activityId
     */
    @Override
    public void updCouponStatus(String plateNum, String companyId, String activityId) throws Exception {
        String sql="update  t_crm_car_coupon set `status`='0' where company_id=? and activity_id=? " +
                "and plate_num=? and `status`='1'";
        this.couponDao.executeSQL(sql,companyId,activityId,plateNum);
    }
}
